The NVRAM chip is used for storing OpenPROM environment variables (=settings), such as the boot device as discussed earlier, while the machine is switched off. It keeps the settings in a similar manner to a PC's BIOS by having an internal lithium battery which keeps the RAM chip active while the machine is powered off, so the clock keeps time and the contents of the chip are not lost. These batteries have a life of 7-10 years, so if you are running a sun4c machine the chances are it has either already expired or will soon. The in the UK the chips are available from Maplin's (order code DC01B) for under £20. If you attempt to fix your old chip and break it you could always buy a new one anyway, so you may as well give it a try.
Locate the NVRAM on the motherboard - it's easy to spot as it is the 24 pin 'double decker' chip (taller than any of other chips), located under the middle SBus slot on a SPARCstation 2. Note it's orientation in the motherboard. Looking at the green motherboard underneath the NVRAM chip's socket you will see the socket is outlined in white print. Look at the print along the 2 shortest sides of the chip (the 'front' and 'back' where there are no legs) and you will see one of them has a small semicircle on it - this marks the end of the chip adjacent to pin 1. Mark this end of the chip with a permanent marker on the chip's label and carefully prise the chip out of it's socket with a small flat bladed screwdriver, being careful not to bend the legs. Look carefully at the chip - at each end there is a blob of shiny epoxy resin extending underneath. You need to remove some of this at the opposite end to the end you marked. The best way is to use a soldering iron - just touch the epoxy with the iron and it will melt back. Don't breath the fumes! You may need to work at it with a small knife a little to scrape the excess away. You should reveal 2 metal contacts - these pass power from the battery in the top half of the chip to the RAM in the bottom half. Put a sensitive digital multimeter across these contacts - there will probably be a few hundred millivolts across these contacts, that's because the battery is knackered! On a brand new chip there would be 3V. As you look at the end of the chip you are working on, the contact on the right should be +ve and the left -ve. Solder 2 short pieces of thin wire to these contacts, and solder the other ends to the top & bottom of a 3V lithium button cell - a CR2032 is a good choice but any 3V button cell will work. Make sure you get the polarity right. Glue the battery on top of the chip, replace the chip & switch on the sparc. As it sparc does it's memory check and detects sbus devices, enter the OpenPROM monitor by pressing L1+STOP-A on the sparc keyboard, or send a BREAK from the terminal emulation software. At the OpenPROM monitor type
ok set-defaults
ok setenv diag-switch? false
to reset the OpenPROM to defaults. Switch off the sparc, wait 30 secs, switch on again. If you have done it right you won't get any error messages.
Reprogramming the NVRAMNow you have an NVRAM capable of retaining information you need to reprogram the HostID & MAC (hardware ethernet address).
ok 01 0 mkp
ok real-machine-type 1 mkp
ok 08 2 mkp
ok 00 3 mkp
ok 20 4 mkp
ok XX 5 mkp
ok XX 6 mkp
ok XX 7 mkp
ok XX c mkp
ok XX d mkp
ok XX e mkp
ok 0 f 0 do i idprom@ xor loop f mkp
Replace XX with a 2 digit random hexadecimal number. Bytes 5 to 7 are the last 3 bytes of the MAC and C to E are the last 3 bytes of the HostID. The last line calculates the checksum and stores it in byte F. This should be repeated any time you change the contents of the NVRAM directly using mkp or you will get an NVRAM checksum error.
For more in-depth information about NVRAM chips fitted to various Sun models please see the Sun NVRAM FAQ (and a mirror ).